package com.nhjf.model.followThePainting;

import java.util.Date;
import java.util.LinkedHashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.nhjf.model.BaseModel;
import com.nhjf.model.followThePainting.followThePaintingDetails.FollowThePaintingDetails;
import com.nhjf.model.system.Role;
import com.nhjf.model.teachers.Courses;
import com.nhjf.model.teachers.CoursesType;
import com.nhjf.model.teachers.Teacher;
@SuppressWarnings("serial")
@Entity
@Table(name = "followThePainting")
public class FollowThePainting extends BaseModel{
	@Id
	@GeneratedValue(generator = "generator")
	@GenericGenerator(name = "generator", strategy = "native")
	@Column(name = "id", unique = true)
	private Long id;
	/**
	 * 跟着学标题
	 */
	@Column(name = "ftstitle")
	private String ftsTitle;
	/**
	 * 人气值
	 */
	@Column(name = "popularity")
	private Integer popularity;
	/**
	 * 上传人
	 */
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "uploader")
	private Teacher uploader;
	/**
	 * 封面
	 */
	@Column(name = "cover")
	private String cover;
	/**
	 * 创建时间
	 */
	@Column(name = "creationTime")
	private Date creationTime;
	/**
	 * 分类1
	 */
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "typeOne")
	private CoursesType typeOne;
	/**
	 * 分类2
	 */
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "typeTwo")
	private CoursesType typeTwo;
	
//	/**
//	 * 跟着画详情
//	 */
//	@OneToMany(fetch = FetchType.LAZY)
//	@JoinTable(name = "followThePainting_har_details",joinColumns = {@JoinColumn(name ="followThePaintingId")},inverseJoinColumns = {@JoinColumn(name = "followThePaintingDetailsId")})
//	private Set<FollowThePaintingDetails> followThePaintingDetailsList = new LinkedHashSet<FollowThePaintingDetails>();
	/**
	 * 宽
	 */
	@Column(name = "width")
	private Integer width;
	/**
	 * 高
	 */
	@Column(name = "height")
	private Integer height;
	
	public Integer getWidth() {
		return width;
	}
	public void setWidth(Integer width) {
		this.width = width;
	}
	public Integer getHeight() {
		return height;
	}
	public void setHeight(Integer height) {
		this.height = height;
	}
//	public Set<FollowThePaintingDetails> getFollowThePaintingDetailsList() {
//		return followThePaintingDetailsList;
//	}
//	public void setFollowThePaintingDetailsList(Set<FollowThePaintingDetails> followThePaintingDetailsList) {
//		this.followThePaintingDetailsList = followThePaintingDetailsList;
//	}
	
	public CoursesType getTypeOne() {
		return typeOne;
	}
	public void setTypeOne(CoursesType typeOne) {
		this.typeOne = typeOne;
	}
	public CoursesType getTypeTwo() {
		return typeTwo;
	}
	public void setTypeTwo(CoursesType typeTwo) {
		this.typeTwo = typeTwo;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getFtsTitle() {
		return ftsTitle;
	}
	public void setFtsTitle(String ftsTitle) {
		this.ftsTitle = ftsTitle;
	}
	public Integer getPopularity() {
		return popularity;
	}
	public void setPopularity(Integer popularity) {
		this.popularity = popularity;
	}
	public Teacher getUploader() {
		return uploader;
	}
	public void setUploader(Teacher uploader) {
		this.uploader = uploader;
	}
	public String getCover() {
		return cover;
	}
	public void setCover(String cover) {
		this.cover = cover;
	}
	public Date getCreationTime() {
		return creationTime;
	}
	public void setCreationTime(Date creationTime) {
		this.creationTime = creationTime;
	}
	
}
